package com.liang.study.design.service.engine.impl;

import com.liang.study.design.model.combin.TreeRich;
import com.liang.study.design.model.vo.EngineResult;
import com.liang.study.design.model.vo.TreeNode;
import com.liang.study.design.service.engine.EngineBae;

import java.util.Map;

/**
 * @author lsm
 * @ClassName TreeENgineHandle.java
 * @Description TODO
 * @createTime 2023年12月21日 11:09:00
 */
public class TreeENgineHandle extends EngineBae {
    @Override
    public EngineResult process(Long treeId, String userId, TreeRich treeRich, Map<String, String> decisionMatter) {
        TreeNode treeNode = this.engineDecisionMaker(treeRich, decisionMatter);
        return new EngineResult(userId, treeId, treeNode.getTreeNodeId(), treeNode.getNodeValue());
    }
}
